<h1>External Packages</h1>
<code>libMesh</code> interfaces to a number of high-quality software packages to provide certain functionality.  This page provides a list of packages and a description of their use in the library.

<hr>
<h2>Parallel Programming Paradigms</h2>

<h2>MPI</h2> The <a href="https://www.mcs.anl.gov/research/projects/mpi/">Message
    Passing Interface</a> is a standard for parallel programming using
the message passing model. PETSc and Trilinos require MPI for
distributed-memory parallel functionality.
<code>libMesh</code> can make use of MPI for certain operations on
distributed-memory (as well as shared-memory and hybrid) parallel
computers, enabling its <code>DistributedMesh</code>
distributed-memory, fully unstructured mesh implementation.

<code>libMesh</code> currently only supports MPI implementations
compatible with the MPI-2 and later MPI standards.

<h2>TBB</h2> Since February 2008 <code>libMesh</code> can be configured to use the <a href="https://threadingbuildingblocks.org/">Threading Building Blocks</a> for thread-based parallelism on shared memory machines.  Several key algorithms in the library have been refactored to be multithreaded, and this effort will continue as additional profiling reveals additional serial bottlenecks.  It is envisioned that for certain classes of problems multilevel parallelism (e.g. message passing between nodes and threading within nodes) will prove more scalable than message passing alone, especially with the introduction of commodity multi-core processors.  The reality is that for implicit problems this can only be achieved with a parallel linear algebra library that also uses multilevel parallelism.



<hr>
<h2>Numerics</h2>

<h3>PETSc</h3> The Portable, Extensible Toolkit for Scientific Computation <a href="https://www.mcs.anl.gov/petsc">(PETSc)</a> is a suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations.

<h3>SLEPc</h3> The Scalable Library for Eigenvalue Computations <a href="http://slepc.upv.es">(SLEPc)</a> is a library for the solution of large scale sparse eigenvalue problems on parallel computers. It is an extension of PETSc and can be used for either standard or generalized eigenproblems, with real or complex arithmetic.

<h3>BLAS</h3> The <a href="https://www.netlib.org/blas">Basic Linear Algebra Subprograms</a> are routines that provide standard building blocks for performing basic vector and matrix operations. The Level 1 BLAS perform scalar, vector and vector-vector operations, the Level 2 BLAS perform matrix-vector operations, and the Level 3 BLAS perform matrix-matrix operations. High-performance implementations of the BLAS are generally provided by computer hardware manufacturers for a particular architecture.  PETSc makes extensive use of the BLAS hence a high-performance BLAS implementation is key to achieving high performance from the PETSc linear solvers.

<h3>LAPACK</h3>
<a href="https://www.netlib.org/lapack">LAPACK</a> is written in Fortran77 and provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems. The associated matrix factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are also provided, as are related computations such as reordering of the Schur factorizations and estimating condition numbers. Dense and banded matrices are handled, but not general sparse matrices.  PETSc makes use of LAPACK in several computational kernels within its linear solver framework.

<h3>Trilinos</h3>
<a href="https://trilinos.org">The Trilinos Project</a> is an effort to develop and implement robust algorithms and enabling technologies using modern object-oriented software design, while still leveraging the value of established libraries. It emphasizes abstract interfaces for maximum flexibility of component interchanging, and provides a full-featured set of concrete classes that implement all abstract interfaces. Current development efforts will permit <code>libMesh</code> can use the Epetra parallel matrix and vector data structures, as well as the AztecOO parallel linear solvers.

<h3>LASPack</h3>
 <a href="https://www.netlib.org/utk/misc/sw_survey/urc/html/LASPack.1.html">LASPack</a> is an object-oriented package of iterative methods, multigrid solvers, and auxiliary routines for the iterative solution of linear systems. It does not run in parallel. There are data structures for vectors, general and square matrices, and preconditioners; a large number of accessing and manipulating these objects is available. LASPack's license is not compatible with the LGPL, and therefore LASPack support is only available if the user configures libmesh with the <code>--disable-strict-lgpl</code> flag.



<hr>
<h2>Mesh Generation and File Formats</h2>
<h3>Triangle</h3> <a href="https://www.cs.cmu.edu/~quake/triangle.html">Triangle</a> is the definitive two-dimensional Delaunay triangulation code written by Jonathan Richard Shewchuk. <code>libMesh</code> can use Triangle to produce Delaunay triangulizations for hybrid-element (not just triangles) input meshes.

<h3>Tetgen</h3> <a href="http://tetgen.org"> Tetgen</a> generates the Delaunay tetrahedralization, Voronoi diagram, constrained Delaunay tetrahedralizations and quality tetrahedral meshes. The main goal of TetGen is to generate suitable meshes for solving partial differential equations by finite element or finite volume methods.


<h3>ExodusII</h3> ExodusII, available via <a href="https://github.com/certik/exodus"> github</a>, is a model developed to store and retrieve data for finite element analyses. It is used for preprocessing (problem definition), postprocessing (results visualization), as well as code to code data transfer. An EXODUS II data file is a random access, machine independent, binary file that is written and read via C, C++, or Fortran library routines which comprise the Application Programming Interface. <code>libMesh</code> contains source code for the EXODUS II library in <code>./contrib/exodusii</code> and can use it to read EXODUS II mesh files.  Additional information may be found on the <a href="https://gsjaardema.github.io/seacas/">Sandia Engineering Analysis Code Access System</a>

<h3>Tecplot</h3> <a href="https://www.tecplot.com">Tecplot</a> is a high-quality engineering and scientific visualization package.  <code>libMesh</code> can write simulation data in either ASCII or binary formatted Tecplot files.

<h3>GMV</h3> The <a href="https://www.generalmeshviewer.com/"> General Mesh Viewer</a> is "an easy to use, 3D scientific visualization tool designed to view simulation data from any type of structured or unstructured mesh."  GMV is developed at <a href="http://www.lanl.gov">Los Alamos National Laboratory</a> and is freely available for a wide range of platforms.  <code>libMesh</code> can write simulation data directly in the GMV file format.



<hr>
<h2>Utilities</h2>

<h3>XDR</h3> The <a href="http://www.faqs.org/rfcs/rfc1014.html">XDR: External Data Representation Standard</a> is a standard for the description and encoding of data.  It is useful for transferring data between different computer architectures, and as such provides a very simple, portable approach for writing platform independent binary files. <code>libMesh</code> uses the <a href="https://libmesh.github.io/doxygen/classlibMesh_1_1Xdr.html">Xdr</a> class to provide a uniform interface to input/output operations for files in either XDR binary or ASCII text formats.

<h3>GetPot</h3> <a href="http://getpot.sourceforge.net">GetPot</a> is a powerful command line and configuration file parsing for C++, Python, Ruby and Java. This tool provides many features, such as separate treatment for options, variables, and flags, unrecognized object detection, prefixes and much more. <code>libMesh</code> uses GetPot to parse command line options upon initialization and for input file parsing in some of the <a href="https://libmesh.github.io/examples.html">examples</a>.

<h3>libHilbert</h3> <a href="http://flame.cs.dal.ca/~chamilto/hilbert">libHilbert</a> is library written by <a href="http://flame.cs.dal.ca/~chamilto">Chris Hamilton</a> for producing compact Hilbert indices for multidimensional data.  <code>libMesh</code> uses <code>libHilbert</code> to assign unique, global identifiers for nodes an elements which are independent of a particular domain decomposition.

<h3>MetaPhysicL</h3>
<a href="https://github.com/roystgnr/MetaPhysicL">MetaPhysicL</a> is a template metaprogramming library by Roy Stogner which implements numerical operator-overloads in support of (primarily) finite element simulations. It is very useful in particular for automatic differentiation. As of Aug 20, 2018, libMesh includes a git submodule for MetaPhysicL which uses a so-called "relative" path in the .gitmodules file. This means that the user's "origin" URL (either https or ssh) is used to determine the full MetaPhysicL URL. If you wish to use MetaPhysicL within libMesh, you must run <code>git submodule update --init</code> before running configure, and pass <code>--enable-metaphysicl</code> to the configure invocation in addition to other arguments. If you are working with a tarball release of libMesh after 1.3.x, MetaPhysicL may not be available (although we are currently working to support this).
th